package com.itshizhan.designpattern.singleton;

/**
 * 构造函数私有
 */
public class Singleton {
    private static final Singleton singleton = new Singleton();
    private Singleton(){
        System.out.println("生成了一个实例");
    }
    public static Singleton getInstance(){
        return singleton;
    }
}
